package com.jianyun.jyzs.presenter;

import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.jianyun.jyzs.dao.EngLocationDao;
import com.jianyun.jyzs.model.P2FragmentModel;
import com.jianyun.jyzs.model.imdoel.IP2FragModel;
import com.jianyun.jyzs.view.iview.IP2FragmentView;

import java.util.HashMap;

/**
 * Created by yangshijun on 2018/5/31.
 */

public class P2FragementPresenter extends MvpBasePresenter<IP2FragmentView> {

    public void getP2DataToService(EngLocationDao dao, HashMap<String, String> map) {
        if (!isViewAttached()) return;
        P2FragmentModel.getInstance().getP2dataToService(dao, map, new IP2FragModel.OnGetP2DataListener() {
            @Override
            public void onSuccess() {
                getView().onSuccess();
            }

            @Override
            public void onFailed(String msg) {
                getView().onFailed(msg);
            }
        });
    }

}
